<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
	<title>${message("shop.cart.title")}[#if systemShowPowered] - 766 SMART HOME[/#if]</title>
	<meta name="author" content="BIZ Team" />
	<meta name="copyright" content="BIZ" />
	<link href="${base}/resources/mobile/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	[#include "/pad/include/search.ftl" /]
	<div class="content container clearfix">
			<div class="left content_main">
				<nav class="head_nav classification clearfix">
					<h2>购物车信息</h2>
				</nav>
				<div class="cart_con">
					[#if cart?? && cart.cartItems?has_content]
					<table class="cart_tab">
						<thead>
							<tr>
								<th><input type="checkbox" id="selectAll"/></th>
								<th>${message("shop.cart.product")}</th>
								<th>类型</th>
								<th>品牌</th>
								<th>${message("shop.cart.price")}</th>
								<th>${message("shop.cart.quantity")}</th>
								<th>${message("shop.cart.subtotal")}</th>
								<th>${message("shop.cart.handle")}</th>
							</tr>
						</thead>
						<tbody>
						[#list cart.cartItems as cartItem]
							<tr>
								<td>
									<input type="checkbox" name="ids" class="select" value="${cartItem.id}">
								</td>
								<td>
									<input type="hidden" name="id" class="product_id" value="${cartItem.id}" />
									<img src="[#if cartItem.product.thumbnail??]${cartItem.product.thumbnail}[#else]${setting.defaultThumbnailProductImage}[/#if]" alt="${cartItem.product.name}" />
									<a href="${base}${cartItem.product.path}" title="${cartItem.product.fullName}" target="_blank">${abbreviate(cartItem.product.fullName, 20, "...")}</a>
									[#if cartItem.isLowStock]
										<span class="red lowStock">[${message("shop.cart.lowStock")}]</span>
									[/#if]
								</td>
								<td comboType="5">
									${cartItem.cartType}
								</td>
								<td>
									${cartItem.product.brand.name}
								</td>
								<td>
									${currency(cartItem.price, true)}
								</td>
								<td>
									<div class="editNum">
										<span class="reduce float_f" id="reduce">-</span>
										<input type="text" name="quantity" class="inputNum quantity float_f" maxlength="4" id="mallNum" value="${cartItem.quantity}" />
										<span class="increase float_f" id="increase">+</span>
									</div>
								</td>
								<td class="red font-bold">
									<span class="subtotal">${currency(cartItem.subtotal, true)}</span>
								</td>
								<td>
									<a href="javascript:;" class="delete blue">${message("shop.cart.delete")}</a>
								</td>
							</tr>
						[/#list]
						</tbody>
					</table>
					<dl id="giftItems"[#if !cart.giftItems?has_content] class="hidden"[/#if]>
						[#if cart.giftItems?has_content]
							<dt>${message("shop.cart.gift")}:</dt>
							[#list cart.giftItems as giftItem]
								<dd>
									<a href="${base}${giftItem.gift.path}" title="${giftItem.gift.fullName}" target="_blank">${abbreviate(giftItem.gift.fullName, 60, "...")} * ${giftItem.quantity}</a>
								</dd>
							[/#list]
						[/#if]
					</dl>
					<div class="con_bottom" id="giftItems"[#if !cart.giftItems?has_content] class="hidden"[/#if]>
						<em id="promotion">
							[#list cart.promotions as promotion]
								${promotion.name}
							[/#list]
						</em>
						<div class="cart_price_row">
							<a href="javascript:;" id="clear" class="clear">${message("shop.cart.clear")}</a>
							<label for="">${message("shop.cart.effectivePrice")}：</label>
							<span class="red font-bold">￥<span class="price" id="effectivePrice">0.00</span></span>
						</div>
						<div class="cart_sub_row">
							<button type="button" id="submit" class="_btn font-bold" />${message("shop.cart.submit")}</button>
						</div>
					</div>
					[#else]
						<p>
							<a href="${base}/pad/index.jhtml">${message("shop.cart.empty")}</a>
						</p>
					[/#if]
				</div>
			</div>
			[#include "/pad/include/aside.ftl" /]
		</div>
	[#include "/pad/include/footer.ftl" /]
</body>
<script type="text/javascript" src="${base}/resources/public/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="${base}/resources/mobile/js/common.js"></script>
<script type="text/javascript">
		var base ="${base}";
</script>
<script type="text/javascript" src="${base}/resources/mobile/js/public.js"></script>
<script type="text/javascript" src="${base}/resources/mobile/js/cart.js"></script>
</html>